package cn.foodshopping.controller;

import cn.foodshopping.service.IUserService;
import cn.foodshopping.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {
@Autowired
IUserService iUserService;
@RequestMapping("login")
public  Object login(String code, String avatarUrl, String nickName){
    System.out.println("code:"+code);
    System.out.println("avatarUrl:"+avatarUrl);
    System.out.println("nickName:"+nickName);
    Result result= iUserService.login(code,avatarUrl,nickName);
    return result;
}
}
